<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../../vue.js"></script>
</head>

<body>
    <div id="app">
        账号:
        <input type="text" v-model="val"><br>
        密码:
        <input type="password" v-model="val1"><br>
        性别:
        <input type="radio" v-model="sex" name="sex" value="0">男
        <input type="radio" v-model="sex" value="1" name="sex">女<br>
        爱好:
        <input type="checkbox" v-model="hobby"  value="学习">学习
        <input type="checkbox" v-model="hobby" value="运动" >运动
        <input type="checkbox" v-model="hobby" value="游戏">游戏<br>
        职业:
        <select name="job" id="" v-model="job">
            <option value="">--请选择--</option>
            <option value="web">--web--</option>
            <option value="php">--php--</option>
            <option value="java">--java--</option>
        </select>
        <br>
        <button @click="getData">获取数据</button>
    </div>
    <script>
        new Vue({
            el:"#app",
            data:{
                val:"",
                val1:"",
                sex:"",
                hobby:[],
                job:"",

            },
            methods:{
                getData(e){
                    console.log([this.val,this.val1,this.sex,this.hobby,this.job]);
                }
            }
        })
    </script>
</body>

</html>